package com.atguigu.spzx.manager.mapper;

import com.atguigu.spyx.model.common.com.atguigu.spyx.model.entity.product.Category;
import com.atguigu.spyx.model.dto.system.CategoryExcelDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author LT
 * @create 2023-11-07-20:50
 */
@Mapper
public interface CategoryMapper {


    List<Category> findByPid(Long pid);

    Boolean hasChildren(Long id);

    Boolean isExist(CategoryExcelDto categoryExcelDto);

    void batchSave(List<CategoryExcelDto> list);

    void deleteById(Long id);

    Category getByCategoryId(Long id);

    void updateById(@Param("category") Category category);

    List<CategoryExcelDto> findAll();
}
